package cn.mw.cmdb.entity;

import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import cn.mw.cmdb.service.ServiceChoose;
import cn.mw.cmdb.service.impl.InstanceMetricServiceImpl;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Schema(description = "实例监控指标")
@Document(collection = "mw_cmdbmd_instance_metric")
public class InstanceMetricInfo implements ServiceChoose {

    @AutoId
    @CMDBProperty(searchType = PropertyTypeString.ID, searchPrefix = "_")
    private String id;

    @CMDBProperty(searchType = PropertyTypeString.ID)
    private String instanceId;

    // 繁忙度[busyness] 可用性[availability] 健康度[healthiness]
    @CMDBProperty
    private String busynessValue;

    @CMDBProperty
    private String availabilityValue;

    @CMDBProperty
    private String healthinessValue;

    @Override
    public String getServiceId() {
        return InstanceMetricServiceImpl.ID;
    }
}

